package com.bjlytr.license.client.config;

import com.bjlytr.license.client.core.ClientInit;
import com.bjlytr.license.client.intercetor.LicenseCheckInterceptor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Ledison
 * @date 2021/9/16
 */
@Configuration
public class StarterConfig {

    @Bean
    @ConditionalOnMissingBean(name = "clientInit")
    public ClientInit getClientInit(){
        return new ClientInit();
    }

    @Bean
    @ConditionalOnMissingBean(name = "licenseCheckInterceptor")
    public LicenseCheckInterceptor getLicenseCheckInterceptor(){
        return new LicenseCheckInterceptor();
    }
}
